#ifndef LOGINDIALOG_H
#define LOGINDIALOG_H
#include <QDialog>
#include <QString>
#include <QMessageBox>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QDebug>
#include <QSqlDriver>
#include <QSqlRecord>
#include <QSqlField>
#include <QSqlError>
#include <QTcpSocket>

namespace Ui {
class LoginDialog;
}

class LoginDialog : public QDialog
{
    Q_OBJECT

public:
    explicit LoginDialog(QWidget *parent = nullptr);
    ~LoginDialog();
    QPushButton * getBackBtn();
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);

public slots:
    void on_exit_btn_clicked();
    void on_login_btn_clicked();
    void on_checkBox_stateChanged(int arg1);
    void on_regis_btn_clicked();
    void on_toolButton_clicked();
    void onConnected();
    void onDisconnected();
    void onReadyRead();
    void acc_changed();

private:
    Ui::LoginDialog *ui;
    QString myaccount;
    QPoint windowPos;
    QPoint mousePos;
    QPoint dPos;
    bool status;
    QTcpSocket *tcpSocket2;
};


#endif // LOGINDIALOG_H
